import service from '../../utils/request'

// 创建入库单
export const stockInApi = {
    create(data) {
        console.log('data', data);
        
        return service({
            url: '/stockIn',
            method: 'post',
            data
        })
    },
    getList(params) {
        return service({
            url: '/stockIn/page',
            method: 'get',
            params
        })
    },
    getListAll(params) {
        return service({
            url: '/stockIn/list',
            method: 'get',
            params
        })
    },
    //查询现有库存
    getStock(params) {
        return service({
            url: '/stockIn/stock',
            method: 'get',
            params
        })
    },
    getItemList(id) {
        return service({
            url: `/stockInItemVo/${id}`,
            method: 'get'
        })
    },
    getItemListAll() {
        return service({
            url: '/stockInItemVo/list',
            method: 'get'
        })
    },
    getItemListPage(params) {
        return service({
            url: '/stockInItemVo/page',
            method: 'get',
            params
        })
    },
    delete(id) {
        return service({
            url: `/stockIn/${id}`,
            method: 'delete'
        })
    }
} 